package com.baidu.shoppingmall.auth.mapper;

import com.baidu.shoppingmall.auth.domain.AuthorityPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 *
 *
 * @author yjf
 */
@Mapper
public interface AuthorityMapper {

//    /**
//     * 查询根权限
//     *
//     * @return 根权限集合
//     */
//    @Select("SELECT "
//            + "id,"
//            + "code,"
//            + "url,"
//            + "authority_comment,"
//            + "authority_type,"
//            + "parent_id,"
//            + "create_time,"
//            + "update_time "
//            + "FROM auth_authority "
//            + "WHERE parent_id IS NULL")
//    @Results({
//            @Result(column = "id", property = "id", id = true),
//            @Result(column = "code", property = "code"),
//            @Result(column = "url", property = "url"),
//            @Result(column = "authority_comment", property = "authorityComment"),
//            @Result(column = "authority_type", property = "authorityType"),
//            @Result(column = "parent_id", property = "parentId"),
//            @Result(column = "create_time", property = "createTime"),
//            @Result(column = "update_time", property = "updateTime")
//    })
//    List<AuthorityPO> listRootAuthorities();


}
